﻿using System.Windows.Controls;
using System.Windows.Interactivity;
using System.Windows;

namespace nRoute.Behaviors
{
    [TypeConstraintAttribute(typeof(DependencyObject))]
    public class TargetedSetFocusAction
#if SILVERLIGHT
        : TargetedTriggerAction<Control>
#else
        : TargetedTriggerAction<UIElement>
#endif
    {
        protected override void Invoke(object parameter)
        {
            if (Target != null) Target.Focus();
        }
    }
}
